package com.sunspring.jbug.support;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;

import java.util.concurrent.TimeUnit;

/**
 * guava本地缓存
 * @author wulei
 * @date 2018-10-10
 **/
public class LocalCache {

    /**
     * 缓存的时间
     */
    public static long duration = 15;

    /**
     * guava本地缓存
     */
    public final static Cache<String, String> CACHE =  CacheBuilder.newBuilder()
            .maximumSize(100)
            .expireAfterAccess(duration, TimeUnit.MINUTES)
            .build();



}
